<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@ page  import="java.sql.*" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            String subject = request.getParameter("SubName");

        %>
        <jsp:useBean id="SubObj1" class="DAO.DAOAction" scope="request" />
        <jsp:useBean id="SubObj2" class="DAO.Insert" scope="request" />
        <jsp:setProperty name="SubObj2" property="sub" value="<%=subject%>" />
        <%
            if (SubObj1.insertSubject(SubObj2) == true) {
                response.sendRedirect("../displaySubject.jsp");
            } else {
                out.println("Khong thanh cong");

            }
        %>
        
    </body>
</html>
